/*
 *    Copyright (c) 2018-2025, waterx All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: waterx
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 文件管理
 *
 * @author Luckly
 * @date 2019-06-18 17:18:42
 */
@Data
@ColumnWidth(10)
@EqualsAndHashCode(callSuper = true)
public class SysFile extends Model<SysFile> {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ExcelProperty(value = "id", converter = LongStringConverter.class)
    private Long id;

    /**
     * 文件名
     */
    @ExcelProperty("file_name")
    private String fileName;

    /**
     * 原文件名
     */
    @ExcelProperty("original")
    private String original;

    /**
     * 容器名称
     */
    @ExcelProperty("bucket_name")
    private String bucketName;

    /***
     * 文件夹
     */
    @ExcelProperty("dir")
    private String dir;

    /**
     * 文件类型
     */
    @ExcelProperty("bucket_name")
    private String type;

    /**
     * 文件组
     */
    @ExcelProperty(value = "group_id", converter = LongStringConverter.class)
    private Long groupId;

    /**
     * 文件大小
     */
    @ExcelProperty(value = "file_size", converter = LongStringConverter.class)
    private Long fileSize;

    /**
     * 文件hash
     */
    @ExcelProperty("hash")
    private String hash;

    /**
     * 上传人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    private String createBy;

    /**
     * 上传时间
     */
    @ExcelProperty("create_time")
    private Date createTime;

    /**
     * 更新人
     */
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @ExcelProperty("update_time")
    private Date updateTime;

    /**
     * 删除标识：1-删除，0-正常
     */
    @ExcelProperty("del_flag")
    private String delFlag;

    /**
     * 租户id
     */
    @ExcelProperty(value = "tenant_id", converter = LongStringConverter.class)
    private Long tenantId;

}
